package leetcode.gametheory;

import leetcode.gametheory.common.GameTheoryUtils;
import leetcode.tree.common.TreeNode;
import leetcode.tree.common.TreeUtils;

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 * int val;
 * TreeNode left;
 * TreeNode right;
 * TreeNode() {}
 * TreeNode(int val) { this.val = val; }
 * TreeNode(int val, TreeNode left, TreeNode right) {
 * this.val = val;
 * this.left = left;
 * this.right = right;
 * }
 * }
 */
class Solution1145 {
    public boolean btreeGameWinningMove(TreeNode root, int n, int x) {
        return GameTheoryUtils.btreeGameWinningMove(root, n, x);
    }
}

public class leetcode1145 {
    public static void main(String[] args) {
        Solution1145 solution1145 = new Solution1145();
        Integer[] root = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
        System.out.println(solution1145.btreeGameWinningMove(TreeUtils.generateLeetcodeTree(root), 11, 3));
    }
}
